package com.cssl.gulimall.auth.feign;

import com.cssl.common.utils.R;
import com.cssl.common.vo.auth.GiteeUser;
import com.cssl.common.vo.auth.UserForgetVO;
import com.cssl.common.vo.auth.UserLoginVO;
import com.cssl.common.vo.auth.UserRegisterVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("gulimall-member")
public interface MemberFeignService {
    /*
    注册
     */
    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegisterVO user);

    /*
    登录
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVO loginVO);

    /*
    gitee登录
     */
    @PostMapping("/member/member/oauth2Login")
    R oauth2Login(GiteeUser giteeUser);

    @PostMapping("/member/member/changePwd")
    R changePwd(@RequestBody UserForgetVO userForgetVO);

    @PostMapping("/member/member/hasPhoneBiding")
    R hasPhoneBiding(@RequestParam String phone);
}
